# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfig do
  @moduledoc """
  Configuration of how features in Featurestore are monitored.

  ## Attributes

  *   `categoricalThresholdConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigThresholdConfig.t`, *default:* `nil`) - Threshold for categorical features of anomaly detection. This is shared by all types of Featurestore Monitoring for categorical features (i.e. Features with type (Feature.ValueType) BOOL or STRING).
  *   `importFeaturesAnalysis` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigImportFeaturesAnalysis.t`, *default:* `nil`) - The config for ImportFeatures Analysis Based Feature Monitoring.
  *   `numericalThresholdConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigThresholdConfig.t`, *default:* `nil`) - Threshold for numerical features of anomaly detection. This is shared by all objectives of Featurestore Monitoring for numerical features (i.e. Features with type (Feature.ValueType) DOUBLE or INT64).
  *   `snapshotAnalysis` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigSnapshotAnalysis.t`, *default:* `nil`) - The config for Snapshot Analysis Based Feature Monitoring.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :categoricalThresholdConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigThresholdConfig.t()
            | nil,
          :importFeaturesAnalysis =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigImportFeaturesAnalysis.t()
            | nil,
          :numericalThresholdConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigThresholdConfig.t()
            | nil,
          :snapshotAnalysis =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigSnapshotAnalysis.t()
            | nil
        }

  field(:categoricalThresholdConfig,
    as:
      GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigThresholdConfig
  )

  field(:importFeaturesAnalysis,
    as:
      GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigImportFeaturesAnalysis
  )

  field(:numericalThresholdConfig,
    as:
      GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigThresholdConfig
  )

  field(:snapshotAnalysis,
    as:
      GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfigSnapshotAnalysis
  )
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfig do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfig.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeaturestoreMonitoringConfig do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
